{extend name="public/base"/}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/books.css">
<style>
	.cgxlabelwrap {
		position: absolute;
		/* width: 100%; */
	}
	#timing_mark {
		font-size: 12px;
		background: #effcff;
		border: 1px solid #40ace1;
		border-radius: 20px;
		padding: 0 5px;
		display: none;
		float: left;
		line-height: 16px;
		margin-right: 5px;
		height: 18px;
	}
	.zwText .save-fail {
		font-size: 12px;
		color: #eb5255;
		background: #ffefef;
		border: 1px solid #eb5255;
		border-radius: 20px;
		padding: 0 5px;
		float: left;
		line-height: 16px;
		margin-right: 5px;
		height: 18px;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
		max-width: 600px;
		position: absolute;
		left: 0;
		top: 0;
	}
	#forbidWords em{cursor:pointer;font-style:normal;}
	#contentHtml {display: none;font-size: 14px;}
	#contentHtml:focus{outline:0px solid transparent;}
	#contentHtml span{background:yellow}

	#titleHtml {display: none;height: 46px;line-height:46px;margin:20px 0 10px 0;border-bottom: 1px solid #e6e6e6;}
	#titleHtml:focus{outline:0px solid transparent;}
	#titleHtml span{background: yellow}
	.zwText {overflow-y: auto;}
	.layui-this{background-color:#00abff!important; }
	#cindextitle{
		float: left;
		width: 150px;
	}
	#title{
		float: left;
		width: 400px;
	}
</style>
{/block}
{block name="body"}
    {include file="public/topmenu" /}
    {include file="public/changepwd" /}
    <div class="mainWrap pageCenter cf">     
        {include file="public/leftmenu" /}
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/timing_plugin.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/DatePicker.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/Dropdown.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/TimePicker.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/Popup.css">
		<script type="text/javascript" src="__PUBLIC__/writer/js/tinymce.min.js"></script>
        <script id="mce_5" type="text/javascript" src="__PUBLIC__/writer/js/plugin.min.js"></script>
        <link rel="stylesheet" type="text/css" id="u0" href="__PUBLIC__/writer/style/skin.min.css">
        <div class="mainRight pb0 fl">
            <div class="crumbsWrap">
                <b></b>
                <i class="before"><a href="{:url('writer/booknovels/index')}"><span>作品管理</span></a></i>
                <em class="diff"></em>
                <i class="current"><span>{$book['title']}</span></i> 
            </div>
            <div class="msgBoxTitle">
                <!--id="createDraftIconBtn"-->

               <a class="create button" href="{:url('writer/booknovels/addchapter',['bookid'=>$book['id']])}"><em class="icon"></em>新建章节</a>
                    <div class="tabSwitch cf">
                    <span><a href="{:url('writer/booknovels/info',['bookid'=>$book['id']])}">作品设置</a></span>
                    <span class="act"><a href="{:url('writer/booknovels/draft',['bookid'=>$book['id']])}">草稿箱</a></span>
					<span><a href="{:url('writer/booknovels/publish',['bookid'=>$book['id']])}">已发布章节</a></span>
                    <span><a href="{:url('writer/booknovels/recycle',['bookid'=>$book['id']])}">回收站</a></span>                   
                </div>
            </div>
            <div class="managerWrap cf">
                <div class="mLeftList fl">
                    <div id="draftListWrap" class="leftListWrap">
                        <div class="titleBox">
                            <p>共 {$chapters|count} 章</p>
                        </div>
                        <div class="sectionManage">
							<div class="sectionList" id="sectionList">
								<!-- 草稿列表 -->
								<ul id="draftList">

                                    {if condition="$type eq 'add'"}
                                    <li data-node="newDraftItem" class="act">
                                        <div class="sectionBox"><p><em>无标题</em></p>
                                            <p class="f12"><i>&nbsp;</i></p>
                                        </div>
                                    </li>
                                    {/if}
                                    {volist name="chapters" id="vo"}
                                    <li data-chapterid="{$vo['id']}" data-volumeid="27543902909822790">
                                        <div class="sectionBox">
                                            <p>
                                                <em>{$vo['chaptername']}</em>
                                            </p>
                                            <p class="f12">
                                                <i>
                                                {$vo['update_time'] | date="m-d H:i",###}                                          
                                                </i>
                                                共{$vo['size']}字
                                            </p>
                                        </div>
                                    </li>
                                    {/volist}
                                </ul>
							</div>
						</div>
					</div>
				</div>

                <div class="mRightContent fl">
                    <!-- 编辑草稿 start -->
                    <div id="editDraftBox" class="midWrap editWrap hidden">
                        <form id="formDraft" name="formDraft" method="post" action="{:url('writer/booknovels/addchapter',['bookid'=>$book['id']])}">
                            <input type="hidden" name="CBID" value="{$book['id']}">
                            <input id="typeHidden" type="hidden" name="type" value="add">
                            <input id="statusHidden" type="hidden" name="status" value="1">
                            <input id="chapterIdHidden" type="hidden" name="CCID" value="">
                            <input id="volumeIdHidden" type="hidden" name="CVIDSelect" value="27566707836032793">
                            <input id="chapterTypeHidden" type="hidden" name="chapterTypeSelect" value="-1">

                            <div class="sectionViewWrap">
                                <div id="portamento_container" style="min-height: 48px; width: 809px;"><div id="draftBtnBox" class="sectionBtnBox cf" data-slide="1" style="top: 0px;">
                                    <div class="titleBtn fr">
                                        <a id="deleteDraftBtn" class="button white" href="javascript:" style="display: none;">删除</a>

										<a class="button white" href="javascript:" onClick="javascript:format()">一键排版</a>

                                        <a id="checkContentWordsBtn" class="button white font" href="javascript:">字数统计</a>
                                        <a id="saveDraftBtn" class="button white" href="javascript:">存为草稿</a>
                                        <a id="showPublishPopupBtn" class="button green" href="javascript:"><span class="icon "></span>发布</a>
                                    </div>
                                    <em class="c999">发布至：</em>
                                    <!-- start 卷 模拟下拉组件-->
                                    <div id="volumeBox" class="select-wrap mid">
                                        <div data-node="selectedItemBox" class="drop-down">
                                            <!-- 选中项 -->
                                            <span id="selectedVolume" data-node="selectedItem" data-volumeid="0" data-vipflag="-1">未选择卷</span>
                                            <b class="combo-arrow"></b>
                                        </div>
                                        <div data-node="listBox" class="drop-list-box hidden">
                                            <!-- 卷列表 -->
                                            <ul>
                                                {volist name="volumes" id="vo"}
                                                <li><a data-volumeid="{$vo['id']}" data-vipflag="-1" href="javascript:">{$vo['chaptername']}</a></li>
                                                {/volist}
                                                </ul>
                                            <a id="openCreateVolumePopupBtn" class="create-j blue" href="javascript:">+ 新建分卷</a>
                                        </div>
                                    </div>
                                    <!-- end 模拟下拉组件-->
                                    <!--原来卷选择框-->
                                    <!--<select id="volumeSelect" name="CVIDSelect">-->
                                        <!---->
                                                <!--<option data-vipflag="-1" value="27566707836032793">第一卷-->
                                                <!--</option>-->
                                        <!---->
                                                <!--<option data-vipflag="-1" value="27566707821693733">作品相关-->
                                                <!--</option>-->
                                        <!---->
                                    <!--</select>-->
                                    <em class="c999">章节类型：</em>
                                    <!-- start 章节类型模拟下拉组件-->
                                    <div id="chapterTypeBox" class="select-wrap min">
                                        <div data-node="selectedItemBox" class="drop-down">
                                            <!-- 选中项 -->
                                            <span id="selectedChapterType" data-node="selectedItem" data-chaptertype="-1">公众章节</span>
                                            <b class="combo-arrow"></b>
                                        </div>
                                        <div data-node="listBox" class="drop-list-box hidden">
                                            <ul>
                                                <li><a data-chaptertype="-1" href="javascript:">公众章节</a></li>
												{if $book['isvip']==1}
                                                <li><a data-chaptertype="1" href="javascript:">VIP章节</a></li>
												{/if}
                                            </ul>
                                        </div>
                                    </div>
                                </div></div>
                                <div id="sectionEdit" class="zwText">
									<div class="cgxlabelwrap">
										<span id="timing_mark" style="display: none;"></span>
										<span class="save-fail" id="forbidWords" style="display:none;">敏感词:</span>
									</div>
                                    <input id="chapterTitleInput" name="chaptertitle" type="text" data-default="此处输入章节号与章节名。示例：“第十章 天降奇缘”" style="color: rgb(187, 187, 187);">
									<div class="tinyMCE-wrap" style="display: none;">
                                    <textarea id="textMce">
                                    </textarea>
									</div>
									<div id="titleHtml" contenteditable="true"></div>
									<div id="contentHtml" contenteditable="true"></div>

                                    <textarea name="content" id="chapterContentInput" data-default="请输入正文。请注意：根据国家相关法律法规要求，请勿上传任何色情、低俗、涉政等违法违规内容，我们将会根据法规进行审核处理和上报。" style="color: rgb(187, 187, 187);"></textarea>
                                </div>    
                                <div class="say-area">
                                    <p>
                                        <textarea id="authorSpeakInput" name="chapterextra" value="" data-default="作者的话（此段不计入字数）" style="color: rgb(187, 187, 187);"></textarea>
                                    </p>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!-- 编辑草稿 end -->
                </div>
            </div>
        <img id="requestLoadingTip" class="loadImg" style="display:none;" src="/public/writer/images/loading.gif"></div>
        <img id="previewImg" src="/booknovels/chaptertmp/CBID/10269398904993803/addType/1.html" width="0" height="0">
        <!-- start 隐藏的上传图片按钮 cgi是后台php地址 -->
        <form class="img-upload-form" action="/booknovels/chaptertmp/CBID/10269398904993803/addType/1.html" method="post" enctype="multipart/form-data">
            <input type="file" id="imgUpload" name="picture" class="clip" accept="image/jpg,image/jpeg,image/png" style="display: none;">
        <input type="hidden" name="__hash__" value="9a47a446e37aa149fa902c5eb5f03576_dd53ec41674f551d42d002904194f19b"></form>
        <!-- end 隐藏的上传图片按钮 -->
        <!-- 定时发布浮层 -->
        <div id="publishPopup" class="popupWrap" style="display:none;">
            <a data-node="close" class="icon closePopup" href="javascript:"></a>
            <h3>章节发布</h3>
            <div class="popupBody p30">
                <div class="popupContent">
                    <ul class="send-time-list">
                        <li>
                            <em>发布章节：</em>
                            <p><span data-node="chapterName"></span> <cite class="tag"><i><b></b></i><span data-node="chapterTypeName"></span></cite></p>
                        </li>
                        <li data-node="publishwordsli">
                            <em>字数统计：</em>
                            <p data-node="publishwordsp">
                                
                            </p>
                        </li>
                        <li>
                            <em>最新章节：</em>
                            <p>
                                无最新章节                    </p>
                        </li>
                        <li>
                            <em>设置发布时间：</em>
                            <div class="setTimeBox">
                                <p class="cf">
                                        <span class="radio on">
                                            <input id="rightaway" data-node="publishTypeRadio" name="publishType" class="radioclass" type="radio" value="2">
                                        </span>
                                    <label class="fl" for="rightaway">立即发布</label><br>
                                        <span class="radio">
                                            <input id="timing" data-node="publishTypeRadio" name="publishType" class="radioclass" type="radio" value="5">
                                        </span>
                                        <label class="fl" for="timing">定时发布<b class="tips c999">（定时发布可能会延迟10-20分钟）</b></label>
                                    
                                    <!-- <i id="publishDateBox" class="dateBox cf">
                                        <cite class="dateIco"></cite>
                                        <input id="publishDateInput" class="dateInput" type="text" value="">
                                    </i> -->


                                    <i class="new-dateBox  cf" id="publishDateBox">
                                        <b class="date-ymd"><input class="lbf-text-input" id="datePickerTrigger-set" type="text"><s class="icon-down"></s><div class="lbf-popup lbf-dropdown lbf-date-picker lbf-reset"><a class="lbf-date-picker-btn-prev date-mode" href="javascript:;"></a><a class="lbf-date-picker-btn-next date-mode" href="javascript:;"></a><div class="lbf-date-picker-viewport"><table class="lbf-date-picker-table"><caption class="lbf-date-picker-caption"><a class="lbf-date-picker-caption-link">2018年04</a></caption><thead><tr><th class="lbf-date-picker-weekday">日</th><th class="lbf-date-picker-weekday">一</th><th class="lbf-date-picker-weekday">二</th><th class="lbf-date-picker-weekday">三</th><th class="lbf-date-picker-weekday">四</th><th class="lbf-date-picker-weekday">五</th><th class="lbf-date-picker-weekday">六</th></tr></thead><tbody><tr><td data-date="1522540437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">1</td><td data-date="1522626837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">2</td><td data-date="1522713237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">3</td><td data-date="1522799637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled lbf-date-picker-date-selected">4</td><td data-date="1522886037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">5</td><td data-date="1522972437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">6</td><td data-date="1523058837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">7</td></tr><tr><td data-date="1523145237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">8</td><td data-date="1523231637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">9</td><td data-date="1523318037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">10</td><td data-date="1523404437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">11</td><td data-date="1523490837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">12</td><td data-date="1523577237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">13</td><td data-date="1523663637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">14</td></tr><tr><td data-date="1523750037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">15</td><td data-date="1523836437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">16</td><td data-date="1523922837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">17</td><td data-date="1524009237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">18</td><td data-date="1524095637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">19</td><td data-date="1524182037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">20</td><td data-date="1524268437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">21</td></tr><tr><td data-date="1524354837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">22</td><td data-date="1524441237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">23</td><td data-date="1524527637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">24</td><td data-date="1524614037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">25</td><td data-date="1524700437707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">26</td><td data-date="1524786837707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">27</td><td data-date="1524873237707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">28</td></tr><tr><td data-date="1524959637707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">29</td><td data-date="1525046037707" class="lbf-date-picker-date  lbf-date-picker-date-enabled ">30</td><td class="lbf-date-picker-date lbf-date-picker-date-blank"></td><td class="lbf-date-picker-date lbf-date-picker-date-blank"></td><td class="lbf-date-picker-date lbf-date-picker-date-blank"></td><td class="lbf-date-picker-date lbf-date-picker-date-blank"></td><td class="lbf-date-picker-date lbf-date-picker-date-blank"></td></tr></tbody></table></div><div data-date="1522799637724" class="lbf-date-picker-today-link lbf-date-picker-date-enabled">今天</div></div></b>
                                        <b class="date-t"><input class="lbf-text-input" id="timePickerTrigger" type="text">
                                        <s class="icon-down"></s><div class="lbf-popup lbf-dropdown lbf-date-picker lbf-reset"><div class="lbf-date-picker-viewport">    <table class="lbf-date-picker-time-table">                <tbody class="lbf-date-picker-time-tbody tbody-hour-mode">                                      <tr>                  <td><a data-hour="0" class="lbf-date-picker-time ">0:00</a></td>                                                             <td><a data-hour="1" class="lbf-date-picker-time ">1:00</a></td>                                                             <td><a data-hour="2" class="lbf-date-picker-time ">2:00</a></td>                                                             <td><a data-hour="3" class="lbf-date-picker-time ">3:00</a></td>               </tr>                            <tr>                  <td><a data-hour="4" class="lbf-date-picker-time ">4:00</a></td>                                                             <td><a data-hour="5" class="lbf-date-picker-time ">5:00</a></td>                                                             <td><a data-hour="6" class="lbf-date-picker-time ">6:00</a></td>                                                             <td><a data-hour="7" class="lbf-date-picker-time lbf-date-picker-time-selected">7:00</a></td>               </tr>                            <tr>                  <td><a data-hour="8" class="lbf-date-picker-time ">8:00</a></td>                                                             <td><a data-hour="9" class="lbf-date-picker-time ">9:00</a></td>                                                             <td><a data-hour="10" class="lbf-date-picker-time ">10:00</a></td>                                                             <td><a data-hour="11" class="lbf-date-picker-time ">11:00</a></td>               </tr>                            <tr>                  <td><a data-hour="12" class="lbf-date-picker-time ">12:00</a></td>                                                             <td><a data-hour="13" class="lbf-date-picker-time ">13:00</a></td>                                                             <td><a data-hour="14" class="lbf-date-picker-time ">14:00</a></td>                                                             <td><a data-hour="15" class="lbf-date-picker-time ">15:00</a></td>               </tr>                            <tr>                  <td><a data-hour="16" class="lbf-date-picker-time ">16:00</a></td>                                                             <td><a data-hour="17" class="lbf-date-picker-time ">17:00</a></td>                                                             <td><a data-hour="18" class="lbf-date-picker-time ">18:00</a></td>                                                             <td><a data-hour="19" class="lbf-date-picker-time ">19:00</a></td>               </tr>                            <tr>                  <td><a data-hour="20" class="lbf-date-picker-time ">20:00</a></td>                                                             <td><a data-hour="21" class="lbf-date-picker-time ">21:00</a></td>                                                             <td><a data-hour="22" class="lbf-date-picker-time ">22:00</a></td>                                                             <td><a data-hour="23" class="lbf-date-picker-time ">23:00</a></td>               </tr>                              </tbody>    </table></div></div></b>
                                    </i>
                                    <i class="tips-error  cf" id="timing-tips-error" style="display:none;">
                                        你设定的发布时间已过时，请重新设置。
                                    </i>
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="confirmBtn">
                    <a id="publishBtn" class="button green full" href="javascript:">发布</a>
                </div>
            </div>
        </div>
        <!-- start 创建角色 弹窗 -->
        <div class="popup-wrap" id="createRolePopup" style="display: none;">
            <a class="close icon" href="javascript:" data-node-do-role="close"></a>
            <div class="popup-title">
                <h3>创建角色</h3>
            </div>
            <div class="popup-content">
                <div class="create-character-wrap">
                    <div class="avatar-wrap">
                        <div class="avatar-box">
                            <img src="./草稿箱-阅文作家专区_files/dafult_photo.png" id="roleImg">
                        </div>
                        <label class="upload-btn blue-btn" for="acUpload">修改头像</label>
                        <input id="acUpload" type="file" hidden="">
                        <p>仅支持jpg、png格式，图片大小不超过5M</p>
                        <div class="select-character" id="roleshowstatus">
                            <span class="radio on">
                                  <input name="character" class="radioclass" id="zsjs" type="radio" value="1" checked="checked">
                            </span>
                            <label for="zsjs">展示角色</label>
                            <span class="radio">
                                  <input name="character" class="radioclass" id="ycjs" type="radio" value="-1">
                            </span>
                            <label for="ycjs">隐藏角色</label>
                        </div>
                    </div>
                    <div class="character-info">
                        <div class="combo-select"><select name="roletype" id="roletype" tabindex="-1">
                            <option value="0" selected="">请选择角色类型</option>
                            <option value="4">男主</option>
                            <option value="5">女主</option>
                            <option value="6">男配</option>
                            <option value="7">女配</option>
                        </select><div class="combo-arrow"></div><dl class="combo-dropdown"><dd class="option-item option-selected" data-index="0" data-value="0">请选择角色类型</dd><dd class="option-item" data-index="1" data-value="4">男主</dd><dd class="option-item" data-index="2" data-value="5">女主</dd><dd class="option-item" data-index="3" data-value="6">男配</dd><dd class="option-item" data-index="4" data-value="7">女配</dd></dl><input type="text" value="" class="combo-input text-input"></div>
                        <input type="text" name="roleName" id="roleName" placeholder="请输入10个字以内的角色名称">

                        <textarea name="roleDesc" id="roleDesc" placeholder="请输入50个字以内的角色备注（选填）"></textarea>
                    </div>
                </div>
            </div>
            <div class="popup-btn">
                <a href="javascript:" id="roleCreateCancel" data-node-do-role="close">取消</a>
                <a href="javascript:" id="roleCreateConfirm">完成</a>
            </div>
        </div>
        <!-- end 创建角色 弹窗 -->
        <script type="text/javascript">
            var default_photo="https://img1.write.qq.com/writer/p1/contentv2/dafult_photo.png";
        </script>
        <!-- start 角色管理 有数据 -->
        <div class="popup-wrap character-control" id="roleManagePopup" style="display: none;">
            <a class="close icon" href="javascript:" data-node-man-role="close"></a>
            <div class="popup-title">
                <a class="add-character" href="javascript:">添加角色</a>
                <h3>角色管理</h3>
            </div>
            <div class="popup-content">
                <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 528px;"><div class="character-list-wrap" id="j-characterList" style="overflow: hidden; width: auto; height: 528px;">
                    <ul>

                    </ul>
                </div><div class="slimScrollBar" style="background: rgb(204, 204, 204); width: 8px; position: absolute; top: 0px; opacity: 1; display: block; border-radius: 0px; z-index: 99; right: -1px;"></div><div class="slimScrollRail" style="width: 8px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 0px; background: rgb(238, 238, 238); opacity: 1; z-index: 90; right: -1px;"></div></div>
            </div>
            <div class="popup-btn full">
                <a id="roleManageFinish" href="javascript:" data-node-man-role="close">完成</a>
            </div>
        </div>
        <!-- end 角色管理 有数据 -->

        <!-- start 删除角色二次确认 没有发言过的 -->
        <div class="popup-tip" id="roleDeletePopup" style="display: none;">
            <div class="popup-content">
                <div class="text-content">
                    <p>是否删除本角色？</p>
                </div>
            </div>
            <div class="popup-btn">
                <a id="roleDeleteCancel" href="javascript:" data-node-del-role="close">取消</a>
                <a id="roleDeleteConfirm" href="javascript:">删除</a>
            </div>

        </div>
        <!-- end 删除角色二次确认 没有发言过的 -->

        <!-- start 插入链接弹窗 -->
                                        <div class="popupWrap w380 hidden" id="j-popupLinkInsert" style="position: fixed;z-index: 10000;left:50%; top:50%; margin: -150px 0 0 -250px"><a class="icon closePopup" data-node="closeBtn" href="javascript:"></a>
                                            <h3>插入链接</h3>
                                            <div class="popupBody p30">
                                                <div class="popupContent">
                                                    <form action="/booknovels/chaptertmp/CBID/10269398904993803/addType/1.html">
                                                        <div class="popup-form-list">
                                                            <ul>
                                                                <li>
                                                                    <input id="linkUrl" type="text" placeholder="输入网址">
                                                                    <p class="error" style="display: block">域名只能是qq.com,yuewen.com</p>
                                                                </li>
                                                                <li>
                                                                    <input id="linkText" type="text" placeholder="链接说明">
                                                                    <p class="error" style="display: block">请输入链接说明</p>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    <input type="hidden" name="__hash__" value="9a47a446e37aa149fa902c5eb5f03576_dd53ec41674f551d42d002904194f19b"></form>
                                                </div>
                                                <div class="confirmBtn">
                                                    <a class="button full" id="linkSubmitBtn" href="javascript:">确认</a>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- end 插入链接弹窗 -->
                                        <!-- start 插入视频弹窗 -->
                                        <div class="popupWrap w380 hidden" id="j-popupVideoInsert" style="position: fixed;z-index: 10000;left:50%; top:50%; margin: -150px 0 0 -250px"><a class="icon closePopup" data-node="closeBtn" href="javascript:"></a>
                                            <h3>插入视频</h3>
                                            <div class="popupBody p30">
                                                <div class="popupContent">
                                                    <form action="/booknovels/chaptertmp/CBID/10269398904993803/addType/1.html">
                                                        <div class="popup-form-list">
                                                            <ul>
                                                                <li>
                                                                    <input name="videoText" type="text" id="videoText" placeholder="请输入视频网址，仅支持腾讯视频网址">
                                                                    <p class="error" id="TXSPerror" style="display: none;">网址格式不符合要求或不是腾讯视频网址</p>
                                                                    <p class="error" id="TXSPerrorEmpty" style="display: none;">网址不能为空</p>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    <input type="hidden" name="__hash__" value="9a47a446e37aa149fa902c5eb5f03576_dd53ec41674f551d42d002904194f19b"></form>
                                                </div>
                                                <div class="confirmBtn">
                                                    <a class="button full" id="videoSubmitBtn" href="javascript:">确认</a>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- end 插入视频弹窗 -->

        <!--新手引导-->
        <!--<div id="mask" class="mask" style="display:none;"></div>
        <div id="joyRideTipContent" style="display:none;">
        <ul>
        <li data-id="numero1" data-text="下一步" class="custom">
        <p>草稿箱用来编辑和存储待发布的章节，支持在线编辑。</p>
        </li>
        <li data-id="numero2" data-text="完成">
        <p>已发布章节用来管理分卷和修改正式发布的章节。</p>
        </li>
        </ul>
        </div>-->
        <script src="__PUBLIC__/writer/js/LBF.js"></script>
        <script type="text/javascript">
            LBF.config({
                "comboSuffix":"?v=20160101",
                // "paths":{"site":"http://127.0.0.1/zj/js"},
                "vars":{
                    "theme":"https://qidian.gtimg.com/lbf/1.0.2/ui/theme/default"
                },
                "combo":false,
                "debug":false
            });
        </script>
        <script type="text/javascript" src="__PUBLIC__/writer/js/chapterJp.js"></script><script type="text/javascript" src="__PUBLIC__/writer/js/chapterDrafts.js"></script><script type="text/javascript">
            $(function () {
                    _tinymce = tinymce;
                var bookId = {$book['id']},
                    isVipNovel = "-1",
                    newVolumeName = "",
                    chapterTmpUrl = "{:url('writer/booknovels/addchapter',['bookid'=>$book['id']])}",
                    isGuide = 1,
                    isGuideChapter = "1", //1显示  0隐藏
                    isCreateChapter = "1", //1写新章节  0默认显示最新一章章节
                    fineLayoutType = "-1";//1为开启富文本编辑器 -1为关闭

                    var imgSrc = "{:config('writer_url')}";
                    CS.page.tinymce.create_chapter.init(bookId,imgSrc);
                //分卷组件
                CS.page.bookManage.volume.init(bookId, isVipNovel, newVolumeName);
                //草稿页
                CS.page.bookManage.chapterDraft.init(bookId, isGuide, isGuideChapter, isCreateChapter, chapterTmpUrl,_tinymce,fineLayoutType);
               //角色
                CS.page.bookManage.roleMange.init(bookId);//角色管理
            });
        </script>
    </div>
    {include file="public/footer" /}

{/block}
{block name="script"}
<script type="text/javascript" src="/public/writer/js/jquery.textSearch-1.0.js"></script>
<script type="text/javascript">
    $('#novelList').on('mouseenter', 'tr',
    function() {
        $(this).addClass('active').siblings('tr').removeClass('active');
		$('#mceu_12').hide();
    });
	$(function(){
		$('#chapterTypeBox').find('[data-node="listBox"] ul li').show();
	})
</script>


{/block}


